{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/css/base.css" media="all">


<body>
    <div class="layui-fluid layui-anim layui-anim-downbit" style=" padding: 0px !important;">
        <div class="layui-card">
            <div class="layui-card-body" style="padding: 15px;">
                <form class="layui-form " action="{:url('refund')}" id="form">
                    <iframe src="{:url('order/edit',array('id'=>$info.order_id))}" style="width:100%; height: 800px; float: left;border: none;" ></iframe>
                    <div style="width: 100%; clear: both; height: 40px; background: #fff;"></div>
                    <div class="centers">
                        
                <input type="hidden" name="refund_id" value="{$info.id}">
                    <div class="layui-form-item">
                        <label class="layui-form-label">退款金额</label>
                        <div class="layui-input-inline">
                            <input type="text" readonly="" autocomplete="off" style=" color: red  !important;" class="layui-input" value="{$info.money}"/>
                        </div>
                        <label class="layui-form-label">退款原因</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" value="{$info.reason}" readonly="">
                        </div>
                        <label class="layui-form-label">退款描述</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" value="{$info.msg}" readonly="">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">退款截图</label>
                        {volist name="info.imageslist" id="vo"}
                        <div class="layui-input-inline">
                            <a href="javascript:;" class="openShowImg images" style="background: url({$vo}) no-repeat; background-size: 100% 100%;" data-value="{$vo}"></a>
                        </div>
                        {/volist}
                    </div>
                    {notempty name="info.express_code"}
                        <div class="layui-form-item">
                            <label for="express_id" class="layui-form-label">快递公司</label>
                            <div class="layui-input-inline">
                                <select  name="express_id" id="express_id" style="max-height: 100px;">
                                    {volist name="express" id="vo"}
                                    <option value="{$vo.id}" {if $info.express_id == $vo.id}selected{/if} >{$vo.title}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">快递单号 </label>
                            <div class="layui-input-block">
                                <input type="text" value="{$info.express_code}" name="express_code"  readonly lay-reqtext="请填写快递单号" placeholder="请填写快递单号" class="layui-input"/>
                            </div>
                        </div>
                    {/notempty}
                        {if $info->status <= 2}
                        <div class="layui-form-item">
                            <label class="layui-form-label">审核</label>
                            <div class="layui-input-block">
                                <input type="radio" name="status" value="3" title="通过退款" {if $info->status == 3} checked {/if}>
                                <input type="radio" name="status" value="-1" title="驳回退款" {if $info->status == -1} checked {/if}>
                            </div>
                        </div>
                        {else}
                        <div class="layui-form-item">
                            <label class="layui-form-label">状态</label>
                            <div class="layui-input-inline">
                                <input type="text"
                                    value="{if $info->status == 3}同意退款{elseif $info->status == -1}已驳回{else}审核中{/if}"
                                    class="layui-input" disabled />
                            </div>
                        </div>
                        {/if}
                        {if $info->status != 3}
                        <div class="layui-form-item">
                            <label class="layui-form-label">驳回原因</label>
                            <div class="layui-input-block">
                                <input type="text" name="reject_msg" value="{$info.reject_msg}" placeholder="如要驳回请输入驳回原因"
                                    class="layui-input" />
                            </div>
                        </div>
                        {/if}
                    </div>
                </form>
            </div>
        </div>
    </div>

    {if $info->status<=2} <div class="layui-form-item layui-layout-admin">
        <div class="layui-input-block">
            <div class="layui-footer" style="left: 0;">
                <button class="layui-btn" lay-filter="save" lay-submit formObj="#form">维权审核</button>
            </div>
        </div>
        </div>
        {/if}

</body>
{include file="public/footer" /}
<script>
layui.use(['form', 'upload', 'table', 'laypage', 'element', 'laytpl'], function () {
    layer = layui.layer;
    form = layui.form;
    table = layui.table;
    upload = layui.upload;
    element = layui.element;
    laytpl = layui.laytpl;
    // layer.config({
    //     skin: 'dark-blue'
    // })
    $(".layui-card-body").on('click', '.openShowImg', function () {
                    //图片预览
                    const value = $(this).attr("data-value").split(','), data = [];
                    for (i in value) {
                        data.push({src: value[i]});
                    }
                    layer.photos({photos: {"data": data, "start": 0}, anim: 5, closeBtn: 1});

                })
})
</script>
<style>
    .layui-form-item {
        margin-bottom: 15px !important;
        clear: both;
        *zoom: 1;
    }
    .images{
        width: 100%;
        padding-top: 100%;
        float: left;
        margin-top: 30px;
    }
    .goBack {
        float: left;
        cursor: pointer;
        font-weight: bold;
        font-size: 15px;
    }

    .center {
        font-weight: bold;
        font-size: 15px;
    }
    .centers{
        width: 100%;
        float: left;
        background: #fff;
        margin-top: 20px;
        padding-top: 40px !important;
    
    }
    
</style>
</html>